home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Eagles Nest BBS 6
/
Eagles_Nest_Mac_Collection_Disc_6.TOAST
/
Windows
/
VBExamples
/
VB Examples.image
/
LOANIN.FRM
(
.txt
)
< prev
next >
Wrap
Visual Basic Form
|
1991-07-08
|
10KB
|
253 lines
LoanInpt
Loan Calculator
Form1
Label3
Term:
Label1
Principal:
inPrinc
inTerm
Label2
Rate (%):
inRate
FileMenu
&File
PrintTableCommand
&Print Table
SaveTableCommand
&Save Table
ExitCommand
E&xit
PrincMenu
&Principal Increment
$1,000
$10,000
$100,000
RateMenu
&Rate Increment
0.125%
0.25%
0.50%
Text1D
Text2v
Combo1
Command1
Command2
Command3&
Picture1
Picture2J
Label1
Label2
Label3r
Text1_Change
Form_Click
InPrinc
InRate
SaveTabl
PrntTabl
InTerm
Options
ExitButtonJ
BadInputm
Calc_Click
TitleX
CalculateTable
CurPrincInc
CurRateInc8
@ ShowTable6
Princb
deltaP-
yrRate
deltaRl
years
StartPrinc
StartRatex
paymentTable
displayTable
tempP
tempRV
PaymentT
MoRate
Months
LoanTabl
FontName=
FontSize
FontBold
False
OutTable
@ Form_Load
LoanOpts
PrntTabl_Click
Printer
TempStr
spLenE
Options_Click0
ExitButton_Click
OutDest
SaveTabl_Clickz
LoanInpta
Frame1
Frame2
OkOptsb
princMenu
princInc
rateMenu
rateIncr%
outMenu{
dest8
princInc_Click
Index
Value
rateIncr_Click
Label1_Click
dest_Click
Check
CheckedC
Rateo
ExitOpt
ExitOpt_ClickW
PrintTableR
SaveTablek
PrintTable_Click.
SaveTable_Click
MenuPrintTable
MenuSaveTable
MenuPrintTable_Click
MenuSaveTable_Click
inTerm_Change
FileMenu
PrintTableCommand
SaveTableCommand
ExitCommandr
FormTable
PRange
RRange
RJust
InStringl
JustWidth
PrintTableCommand_Click
SaveTableCommand_Click
FileName
ExitCommand_Click
PInc_Click
RInc_Click,
SelectWholeText
InTextBox
SelStart
SelLengthY
InPrinc_GotFocus
InRate_GotFocus
inRate_DragDrop
Calc_GotFocus
ReadCommandLine
InLine
FirstSpace
SecondSpace
GetFocus
LoanInpt.FRMM
Declarationss
Define True and False constants..
Declare output table arrays.n
Declare flag for input errors.
Declare increment variables
End of declarations for LoanInpt.FRM
Form_Load
Build the drop-down list for
the Term combo box.
4 years"
5 years"
10 years
15 years
20 years
30 years
Initialize the increment values.d
Read the user-supplied command line.n
Form_Load
Calc_Click
Produce the output table when
the user clicks the Calc button.
Read the input values and convert them to numbers.)
Check for input errors or missing values,
and display an error message if necessary.
Input values are not valid."
Loan Parameters"
If input is OK, calculate and display the loan table.
Calc_Clicki
CalculateTable
Build the payment table in the output arrays:
-- FormTable$ is the for displaying the table.%
-- OutTable$ is for printing and saving the table.%
Calculate the starting principal and rate for the
table, given the current increment values.f
Compute the first column and row of the table.t
$#,######"
0.00%"
Fill in the rest of the table.
$#,####.00
CalculateTable
ShowTable
Display the payment table in the LoanTabl form.
Output widths.
Tms Rmn"
Special treatment for the target"
payment amount, displayed in bold.
ShowTable
RJust
Right-justify a string within a width.
RJust$
PrintTableCommand_Click
Print the payment table.1
PrintTableCommand_Click
SaveTableCommand_Click
Save the table as a text file.t
LoanTemp.Txt
SaveTableCommand_Click#
ExitCommand_Click
Terminate the program performance.b
ExitCommand_Click
PInc_Click
Calculate the principal increment
value, using the Index number of the*
currently selected option button.
Uncheck the old option and check the new.
Recalculate the table.l
PInc_Click
RInc_Click
Determine the rate increment value,
using the Index number of the currently
selected option button.
Uncheck the old option and check the new.
Recalculate the table.l
RInc_Click
Payment
Calculate the monthly payment.M
Payment
SelectWholeText
Highlight current entry when thes
user selects a text box.w
SelectWholeText
InPrinc_GotFocus
Highlight current entry when.
text box is selected.
InPrinc_GotFocus
InRate_GotFocus
Highlight current entry when
text box is selected.
InRate_GotFocus
ReadCommandLine
Read the user-supplied command line.
The line should be in the format:
principal rate term
where one or more spaces separate eacha
numeric data item. This routine ignores
any command line that does not conformo
to this format. $
Continue only if InLine is not blank.
Find locations of two space-character a
separators. Eliminate any extra spaces.
Continue only if separators are present..
Enter the loan parameters from the command line.d
Use Val and Str$ to convert any non-numeric n
input value into "0".
ReadCommandLine